<!DOCTYPE html>
<html class="ui-page-login">

<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>足迹</title>
    <link href="../../css/mui.css" rel="stylesheet"/>
    <link href="../../css/reset.css" rel="stylesheet"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="full-screen" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="address=no">
    <script src="../../js/jquery.min.js"></script>
    <script type="text/javascript">
        var docEl = document.documentElement;
        var clientWidth = docEl.clientWidth;
        docEl.style.fontSize = (clientWidth / 10) + 'px';
        $(document).ready(function () {
            (function (doc, win) {
                var docEl = doc.documentElement,
                        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                        recalc = function () {
                            var clientWidth = docEl.clientWidth;
                            docEl.style.fontSize = (clientWidth / 10) + 'px';
                        };

                if (!doc.addEventListener) return;
                win.addEventListener(resizeEvt, recalc, false);
                doc.addEventListener('DOMContentLoaded', recalc, false);
            })(document, window);
        });
    </script>
</head>

<body>
<header class="mui-bar mui-bar-nav user-heading">
    <a href="user.html" class="mui-icon back-btn mui-pull-left act-btn"></a>
    <h1 class="mui-title">足迹</h1>
</header>
<article class="mui-content follow-box">
    <section class="wrapper">
        <div class="mui-row mui-text-center"></div>
    </section>
</article>
<script src="../../js/mui.min.js"></script>
<script src="../../js/main.js"></script>
<script>
    $(function(){
        if( isLogin() ){
            var user = getUserInfo();
            getlist(user);
        }
        function getlist(user){
            var data = {
                apiCode: '_follow_list_001',
                userToken: user.userToken,
                page: 1,
                size: 6
            };
            http(data, function (responed) {
                if (responed.error == 0) {
                    if( responed.info.code ) return false;
                    for( var i in responed.info.data ){
                        var item = responed.info.data[i];
                        var html = '<div class="mui-col-sm-6">'+
                                '<div class="shop-box">'+
                                '<div class="img-box">'+
                                '<img>'+
                                '</div>'+
                                '<div class="shop-desc-box">'+
                                '<p class="price">￥12<span class="old-orice">￥15</span></p>'+
                                '<p class="shop-name">菲律宾进口香蕉，香甜可口1kg，8-9只</p>'+
                                ' </div>'+
                                '</div>'+
                                '</div>';
                    }
                    $('.follow-box .wrapper .mui-row').append(html);
                } else {
                    mui.alert(responed.info);
                }
            });
        }
    });
</script>
</body>

</html>